<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            /* #box{width: 1000px;text-align: center;line-height: 20px;border: solid 1px black;overflow: hidden}
            .xbox{width: 250px;border: solid 1px black;box-sizing: border-box;float: left;}
            .xbox img{width: 100%;height: 160px;} */

            img{width: 200px;height: 180px;}
            .box{width: 200px;border: solid 1px black;float: left;}
            span{
                display: block;


                text-align: center;
                line-height: 50px;
            }
            .span2{
                font-size: 16px;
                float: left;
                padding: 0 10px;
            }
            .span3{
                font-size: 16px;
                float: right;
                padding: 0 5px;
                margin-right: 10px;
                background: red;
            }
        </style>
    </head>
    <body>
        <!-- <div class="box">
    <img src="" alt="">
    <span></span>
    <div class="details">
        <span class="span2"></span>
        <span class="span3"></span>
    </div>
</div> -->
    </body>
    <script>
    // var biao = "https://img.alicdn.com/bao/uploaded///gma.alicdn.com/bao/uploaded/i2/96416556/O1CN01rZXYmi1yIhJDhoCWR_!!0-saturn_solar.jpg_400x400q90.jpg_.webp";
    // var xie = "https://img.alicdn.com/bao/uploaded/i4/1694051299/O1CN01vxvfec1LSz9m0SuXK_!!1694051299.jpg_400x400q90.jpg_.webp";
    // var phone = "https://img.alicdn.com/bao/uploaded/i4/2201227850912/O1CN01egBKZ81IbjsEC5riV_!!2201227850912.jpg_400x400q90.jpg_.webp"

    // document.write('<img src="'+ biao + '" alt="">');
    // document.write('<img src="'+ xie + '" alt="">');
    // document.write('<img src="'+ phone + '" alt="">');

    var imgs = [{
        title:"精品男士手表",
        price:"￥99",
        seckill:"立即秒杀",
        src:"https://img.alicdn.com/bao/uploaded///gma.alicdn.com/bao/uploaded/i2/96416556/O1CN01rZXYmi1yIhJDhoCWR_!!0-saturn_solar.jpg_400x400q90.jpg_.webp"
    },{
        title:"时尚男鞋",
        price:"￥399",
        seckill:"立即秒杀",
        src:"https://img.alicdn.com/bao/uploaded/i4/1694051299/O1CN01vxvfec1LSz9m0SuXK_!!1694051299.jpg_400x400q90.jpg_.webp"
    },{
        title:"HUAWEI mate40Pro",
        price:"￥5990",
        seckill:"立即秒杀",
        src:"https://img.alicdn.com/bao/uploaded/i4/2201227850912/O1CN01egBKZ81IbjsEC5riV_!!2201227850912.jpg_400x400q90.jpg_.webp"
    },{
        title:"精品时尚男裤",
        price:"￥299",
        seckill:"立即秒杀",
        src:"https://img.alicdn.com/bao/uploaded/i1/436548508/O1CN01ISZa4r2CiiLhqHoGC_!!436548508-0-lubanu-s.jpg_400x400q90.jpg_.webp"
    },{
        title:"性感小内裤",
        price:"￥99",
        seckill:"立即秒杀",
        src:"https://img.alicdn.com/bao/uploaded///gma.alicdn.com/bao/uploaded/i1/397510151/O1CN0166ESII1CzCUbdRuVz_!!0-saturn_solar.jpg_400x400q90.jpg_.webp"
    }];



    var str = "";
    // for(var i=0;i<imgs.length;i++){
    //     str += '<div class="box"><img src="'+ imgs[i].src + '" alt=""><span>'+ imgs[i].title +'</span></div>';
    // }
    for(var i=0;i<imgs.length;i++){
        str += '<div class="box"><img src="'+ imgs[i].src + '" alt=""><span>'+ imgs[i].title +'</span><div class="details"><span class="span2">'+imgs[i].price+'</span><span class="span3">'+imgs[i].seckill+'</span></div></div>';
    }
    document.write(str);

    </script>
</html>

